import Vue from 'vue'
import Router from 'vue-router'
import homepage from '@/views/demo/homepage'
import page2 from '@/views/demo/page2'
import page3 from '@/views/demo/page3'
import camerapage from '@/views/demo/camera/camerapage'
import iconfont from '@/views/demo/iconfont/iconfont'

import mappage from '@/views/demo/map/mappage'
import degaoMap from '@/views/demo/map/degaoMap'
import webGis from '@/views/demo/map/webGis'

import DBPage from '@/views/demo/DB/DBPage'

import fileDemo from '@/views/demo/file/fileDemo'
import fileBrowser from '@/views/demo/file/fileBrowser'

import listDemo from '@/views/demo/list/listDemo'
import listDetail from '@/views/demo/list/listDetail'

import httpDemo from '@/views/demo/http/httpDemo'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'homepage',
      component: homepage
    },
    {
      path: '/page2',
      name: 'page2',
      component: page2
    },
    {
      path: '/page3',
      name: 'page3',
      component: page3
    },
    {
      path: '/camerapage',
      name: 'camerapage',
      component: camerapage
    },
    {
      path: '/iconfont',
      name: 'iconfont',
      component: iconfont
    },
    {
      path: '/mappage',
      name: 'mappage',
      component: mappage
    },
    {
      path: '/degaoMap',
      name: 'degaoMap',
      component: degaoMap
    },
    {
      path: '/DBPage',
      name: 'DBPage',
      component: DBPage
    },
    {
      path: '/fileDemo',
      name: 'fileDemo',
      component: fileDemo
    },
    {
      path: '/fileBrowser',
      name: 'fileBrowser',
      component: fileBrowser
    },
    {
      path: '/listDemo',
      name: 'listDemo',
      component: listDemo
    },
    {
      path: '/listDetail/:id',
      name: 'listDetail',
      component: listDetail
    },
    {
      path: '/webGis',
      name: 'webGis',
      component: webGis
    },
    {
      path: '/httpDemo',
      name: 'httpDemo',
      component: httpDemo
    },
    {
      path:'*',
      name:'noFound',
      component:{
        template:'<h2>404 no found page</h2>'
      }
    }
  ]
})
